home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
- <background>
- <id>2606</id>
- <filler1>0</filler1>
- <bitmap>BMAP_2237.pbm</bitmap>
- <cantDelete> <true /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <link rel="stylesheet" type="text/css" href="stylesheet_3256.css" />
- <part>
- <id>5</id>
- <type>button</type>
- <visible> <false /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>65531</left>
- <top>0</top>
- <right>416</right>
- <bottom>33</bottom>
- </rect>
- <style>opaque</style>
- <showName> <true /> </showName>
- <highlight> <true /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Geneva</font>
- <textSize>18</textSize>
- <textStyle>condense</textStyle>
- <name>Check, convert and optimize your web pages</name>
- <script></script>
- </part>
- <name></name>
- <script>function optimize storage
-
- set cursor to busy
- put FullReplace (storage,tab,"") into storage
- put FullReplace (storage,return & return,return) into storage
- put FullReplace (storage,lineFeed," ") into storage
- put FullReplace (storage,formFeed," ") into storage
- put FullReplace (storage,"</SCRIPT><","</SCRIPT> <") into storage
- put FullReplace (storage,"</script><","</script> <") into storage
- put FullReplace (storage,"</APPLET><","</APPLET> <") into storage
- put FullReplace (storage,"</applet><","</applet> <") into storage
- put FullReplace (storage,"</OBJECT><","</OBJECT> <") into storage
- put FullReplace (storage,"</object><","</object> <") into storage
- put FullReplace (storage,"</STYLE><","</STYLE> <") into storage
- put FullReplace (storage,"</style><","</style> <") into storage
- put FullReplace (storage,"</PRE><","</PRE> <") into storage
- put FullReplace (storage,"</pre><","</pre> <") into storage
- put FullReplace (storage,"</NOOP><","</NOOP> <") into storage
- put FullReplace (storage,"</noop><","</noop> <") into storage
- set cursor to busy
-
- put storage into tempStor
- repeat until offset("://",tempStor) = 0
- set cursor to busy
- put offset("://",tempStor) into temp
- put tab into char temp of tempStor
- if temp Γëá 0 then
- repeat with cnt1 = 1 to 200
- if char temp+cnt1 of tempStor = quote then exit repeat
- end repeat
- if cnt1 Γëá 200 then
- repeat with cnt2 = 4 to cnt1
- if char temp+cnt2 of tempStor = "/" then exit repeat
- end repeat
- if cnt2 = cnt1 and char (temp+cnt1)-1 of tempStor Γëá "/" then
- put "/" before char temp+cnt1 of tempStor
- end if
- else exit repeat
- end if
- end repeat
- put FullReplace (tempStor,tab&"//","://") into tempStor
- put tempStor into storage
-
- put 0 into countScripts
- put empty into scriptStorage
- repeat until offset("<SCRIPT",storage) = 0
- add 1 to countScripts
- if countScripts > 100 then
- answer "A <SCRIPT>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </SCRIPT> tag."&return&return&¬
- "The <SCRIPT> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<SCRIPT",storage) into firstScriptOccur
- put offset("</SCRIPT",storage) into lastScriptOccur
- put tab&char firstScriptOccur to lastScriptOccur+9 of storage before scriptStorage
- delete char firstScriptOccur to lastScriptOccur+9 of storage
- put "pqrcba" after char firstScriptOccur-1 of storage
- end repeat
- delete char 1 of scriptStorage
-
- put 0 into countApplets
- put empty into appletStorage
- repeat until offset("<APPLET",storage) = 0
- add 1 to countApplets
- if countApplets > 100 then
- answer "A <APPLET>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </APPLET> tag."&return&return&¬
- "The <APPLET> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<APPLET",storage) into firstAppletOccur
- put offset("</APPLET",storage) into lastAppletOccur
- put tab&char firstAppletOccur to lastAppletOccur+9 of storage before appletStorage
- delete char firstAppletOccur to lastAppletOccur+9 of storage
- put "xyzrqp" after char firstAppletOccur-1 of storage
- end repeat
- delete char 1 of appletStorage
-
- put 0 into countObjects
- put empty into objectStorage
- repeat until offset("<OBJECT",storage) = 0
- add 1 to countObjects
- if countObjects > 100 then
- answer "A <OBJECT>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </OBJECT> tag."&return&return&¬
- "The <OBJECT> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<OBJECT",storage) into firstObjectOccur
- put offset("</OBJECT",storage) into lastObjectOccur
- put tab&char firstObjectOccur to lastObjectOccur+9 of storage before objectStorage
- delete char firstObjectOccur to lastObjectOccur+9 of storage
- put "rqpxyz" after char firstObjectOccur-1 of storage
- end repeat
- delete char 1 of objectStorage
-
- put 0 into countStyle
- put empty into styleStorage
- repeat until offset("<STYLE",storage) = 0
- add 1 to countStyle
- if countStyle > 100 then
- answer "A <STYLE>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </STYLE> tag."&return&return&¬
- "The <STYLE> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<STYLE",storage) into firstStyleOccur
- put offset("</STYLE",storage) into lastStyleOccur
- put tab&char firstStyleOccur to lastStyleOccur+8 of storage before styleStorage
- delete char firstStyleOccur to lastStyleOccur+8 of storage
- put "cbafed" after char firstStyleOccur-1 of storage
- end repeat
- delete char 1 of styleStorage
-
- put 0 into countPre
- put empty into preStorage
- repeat until offset("<PRE",storage) = 0
- add 1 to countPre
- if countPre > 100 then
- answer "A <PRE>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </PRE> tag."&return&return&¬
- "The <PRE> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<PRE",storage) into firstPreOccur
- put offset("</PRE",storage) into lastPreOccur
- put tab&char firstPreOccur to lastPreOccur+6 of storage before preStorage
- delete char firstPreOccur to lastPreOccur+6 of storage
- put "rqpzyx" after char firstPreOccur-1 of storage
- end repeat
- delete char 1 of preStorage
-
- put 0 into countNoop
- put empty into noopStorage
- repeat until offset("<NOOP",storage) = 0
- add 1 to countNoop
- if countNoop > 100 then
- answer "A <NOOP>-related error occurred during optimizing." & return & ¬
- "Maybe a syntax error exists. It could be a missing </NOOP> tag."&return&return&¬
- "The <NOOP> block will be missing or damaged in the optimized file." with "Continue"
- exit repeat
- end if
- put offset("<NOOP",storage) into firstNoopOccur
- put offset("</NOOP",storage) into lastNoopOccur
- put tab&char firstNoopOccur to lastNoopOccur+7 of storage before noopStorage
- delete char firstNoopOccur to lastNoopOccur+7 of storage
- put "qrpyzx" after char firstNoopOccur-1 of storage
- end repeat
- delete char 1 of noopStorage
-
- put FullReplace (scriptStorage," =","=") into scriptStorage
- put FullReplace (scriptStorage,"= ","=") into scriptStorage
- put FullReplace (appletStorage," =","=") into appletStorage
- put FullReplace (appletStorage,"= ","=") into appletStorage
- put FullReplace (objectStorage," =","=") into objectStorage
- put FullReplace (objectStorage,"= ","=") into objectStorage
- put FullReplace (styleStorage," =","=") into styleStorage
- put FullReplace (styleStorage,"= ","=") into styleStorage
-
- set cursor to busy
- repeat until offset("<META NAME=GENERATOR",storage) = 0
- set cursor to busy
- put offset("<META NAME=GENERATOR",storage) into temp
- if temp Γëá 0 then
- repeat with count = 1 to 1000
- if char temp+count of storage = ">" then exit repeat
- end repeat
- end if
- if count = 1000 then
- exit repeat
- else delete char temp to temp+count of storage
- end repeat
- repeat until offset("<X-CLARIS",storage) = 0
- set cursor to busy
- put offset("<X-CLARIS",storage) into temp
- if temp Γëá 0 then
- repeat with count = 1 to 1000
- if char temp+count of storage = ">" then exit repeat
- end repeat
- end if
- if count = 1000 then
- exit repeat
- else delete char temp to temp+count of storage
- end repeat
- repeat until offset("gridx",storage) = 0
- set cursor to busy
- put offset("gridx",storage) into temp
- if temp Γëá 0 then
- repeat with count = 1 to 1000
- if char temp+count of storage = ">" then exit repeat
- end repeat
- end if
- if count = 1000 then
- exit repeat
- else delete char temp to temp+count-1 of storage
- end repeat
- set cursor to busy
- put FullReplace (storage,"X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT","",true,false) into storage
- put FullReplace (storage,"<table cool","<table",true,false) into storage
- put FullReplace (storage,"cntrlrow>",">",true,false) into storage
-
- repeat until " " is not in storage
- put FullReplace (storage," "," ") into storage
- end repeat
- put FullReplace (storage," >",">") into storage
- put FullReplace (storage,"< ","<") into storage
- set cursor to busy
-
- put FullReplace (storage,"</AREA>","",true,false) into storage
- put FullReplace (storage,"</BASE>","",true,false) into storage
- put FullReplace (storage,"</BASEFONT>","",true,false) into storage
- put FullReplace (storage,"</BR>","",true,false) into storage
- put FullReplace (storage,"</COL>","",true,false) into storage
- put FullReplace (storage,"</FRAME>","",true,false) into storage
- put FullReplace (storage,"</HR>","",true,false) into storage
- put FullReplace (storage,"</IMG>","",true,false) into storage
- put FullReplace (storage,"</INPUT>","",true,false) into storage
- put FullReplace (storage,"</ISINDEX>","",true,false) into storage
- put FullReplace (storage,"</LINK>","",true,false) into storage
- put FullReplace (storage,"</META>","",true,false) into storage
- put FullReplace (storage,"</PARAM>","",true,false) into storage
-
- put FullReplace (storage,"<CITE","<I",true,false) into storage
- put FullReplace (storage,"</CITE>","</I>",true,false) into storage
- put FullReplace (storage,"<STRONG","<B",true,false) into storage
- put FullReplace (storage,"</STRONG>","</B>",true,false) into storage
-
- if hilite of btn id 127 and "xhtml" is not in line 1 to 2 of storage then
- set cursor to busy
- put FullReplace (storage,"</DD>","",true,false) into storage
- put FullReplace (storage,"</DT>","",true,false) into storage
- put FullReplace (storage,"</LI>","",true,false) into storage
- put FullReplace (storage,"</OPTION>","",true,false) into storage
- put FullReplace (storage,"</TBODY>","",true,false) into storage
- put FullReplace (storage,"</TFOOT>","",true,false) into storage
- put FullReplace (storage,"</THEAD>","",true,false) into storage
- put FullReplace (storage,"</P>","",true,false) into storage
- set cursor to busy
- end if
-
- if hilite of btn id 119 then
- set cursor to busy
- put FullReplace (storage,">" & return,">") into storage
- put FullReplace (storage," " & return," ") into storage
- put FullReplace (storage,return & " "," ") into storage
- set cursor to busy
- put FullReplace (storage,"> <","><") into storage
- put FullReplace (storage,"</font><a","</font> <a") into storage
- put FullReplace (storage,"</FONT><A","</FONT> <A") into storage
- put FullReplace (storage,"</a><font","</a> <font") into storage
- put FullReplace (storage,"</A><FONT","</A> <FONT") into storage
- set cursor to busy
- put FullReplace (storage,"</a><a","</a> <a") into storage
- put FullReplace (storage,"</A><A","</A> <A") into storage
- put FullReplace (storage," "," ") into storage
- end if
-
- repeat with i = countNoop down to 1
- put offset("qrpyzx",storage) into marker
- put item i of noopStorage into char marker to marker+5 of storage
- end repeat
- repeat with i = countPre down to 1
- put offset("rqpzyx",storage) into marker
- put item i of preStorage into char marker to marker+5 of storage
- end repeat
- repeat with i = countStyle down to 1
- put offset("cbafed",storage) into marker
- put item i of styleStorage into char marker to marker+5 of storage
- end repeat
- repeat with i = countObjects down to 1
- put offset("rqpxyz",storage) into marker
- put item i of objectStorage into char marker to marker+5 of storage
- end repeat
- repeat with i = countApplets down to 1
- put offset("xyzrqp",storage) into marker
- put item i of appletStorage into char marker to marker+5 of storage
- end repeat
- repeat with i = countScripts down to 1
- put offset("pqrcba",storage) into marker
- put item i of scriptStorage into char marker to marker+5 of storage
- end repeat
-
- repeat until return &" "& return is not in storage
- put FullReplace (storage,return &" "& return,return) into storage
- end repeat
-
- return storage
- end optimize
-
- function markImageAttributes storage,thisPage
- put 0 into errorWHOccur
- put 0 into errorAltOccur
- put 0 into totalNoWHOccur
- put 0 into totalNoAltOccur
- put empty into WHTagList
- put empty into AltTagList
- put storage into tempStorage
- repeat until offset("<IMG",tempStorage) = 0
- set cursor to busy
- add 1 to errorWHOccur
- add 1 to errorAltOccur
- put offset("<IMG",tempStorage) into temp
- if temp Γëá 0 then
- put 0 into count
- repeat
- add 1 to count
- if char temp+count of tempStorage = ">" then exit repeat
- end repeat
- if "WIDTH" is not in char temp to temp+count of tempStorage or¬
- "HEIGHT" is not in char temp to temp+count of tempStorage then
- add 1 to totalNoWHOccur
- put space&errorWHOccur&comma after WHOccurList
- put (offset("<IMG",tempStorage))+errorWHOccur-1 & tab after WHTagList
- end if
- if "ALT" is not in char temp to temp+count of tempStorage then
- add 1 to totalNoAltOccur
- put space&errorAltOccur&comma after AltOccurList
- put (offset("<IMG",tempStorage))+errorAltOccur-1 & tab after AltTagList
- end if
- end if
- delete char offset("<IMG",tempStorage) of tempStorage
- end repeat
- delete last char of WHTagList
- delete last char of AltTagList
- repeat with i = 1 to number of items of WHTagList
- set cursor to busy
- put "ΓÇó" into char (item i of WHTagList) of storage
- end repeat
- if not hilite of btn id 68 then
- repeat with i = 1 to number of items of AltTagList
- set cursor to busy
- put "ΓÇó" into char (item i of AltTagList) of storage
- end repeat
- end if
- if totalNoWHOccur > 0 then
- if totalNoWHOccur = 1 then
- put "tag" into text1
- else
- put "tags" into text1
- put " and" into last char of word (number of words of WHOccurList)-1 of WHOccurList
- end if
- delete char 1 of WHOccurList
- delete last char of WHOccurList
- put return&"Found no WIDTH and/or HEIGHT attributes in"&&totalNoWHOccur&&"IMG"&&text1&&¬
- "of '"&thisPage&"', i.e. in IMG tag number"&&WHOccurList&"." after cd fld "Log"
- set textStyle of word 2 to 3 of last line of cd fld "Log" to bold
- set textStyle of word 5 to 6 of last line of cd fld "Log" to bold
- end if
- if totalNoAltOccur > 0 and not hilite of btn id 68 then
- if totalNoAltOccur = 1 then
- put "tag" into text1
- else
- put "tags" into text1
- put " and" into last char of word (number of words of AltOccurList)-1 of AltOccurList
- end if
- delete char 1 of AltOccurList
- delete last char of AltOccurList
- put return&"Found no ALT attributes in"&&totalNoAltOccur&&"IMG"&&text1&&¬
- "of '"&thisPage&"', i.e. in IMG tag number"&&AltOccurList&"." after cd fld "Log"
- set textStyle of word 2 to 4 of last line of cd fld "Log" to bold
- end if
- return storage
- end markImageAttributes
-
- function markTagStructure storage,thisPage
- set the itemDelimiter to comma
- put prepareCheckStorage(storage) into tempStorage
- if hilite of btn id 34 then
- put (number of items of allBeginTags1a())+(number of items of allBeginTags2a()) into totalTags
- else put (number of items of allBeginTags1())+(number of items of allBeginTags2()) into totalTags
- repeat with i = 1 to totalTags
- set cursor to busy
- put empty into beginTagOffsetList
- put empty into endTagOffsetList
- if hilite of btn id 34 then
- put item i of (allBeginTags1a()&","&allBeginTags2a()) into beginTag
- put item i of (allEndTags1a()&","&allEndTags2a()) into endTag
- else
- put item i of (allBeginTags1()&","&allBeginTags2()) into beginTag
- put item i of (allEndTags1()&","&allEndTags2()) into endTag
- end if
- put 0 into countBeginTags
- repeat until offset("<"&beginTag,tempStorage) = 0
- set cursor to busy
- add 1 to countBeginTags
- put offset("<"&beginTag,tempStorage)&"," after beginTagOffsetList
- put "x" into char offset("<"&beginTag,tempStorage) of tempStorage
- end repeat
- put 0 into countEndTags
- repeat until offset("<"&endTag,tempStorage) = 0
- set cursor to busy
- add 1 to countEndTags
- put offset("<"&endTag,tempStorage)&"," after endTagOffsetList
- put "x" into char offset("<"&endTag,tempStorage) of tempStorage
- end repeat
- delete last char of beginTagOffsetList
- delete last char of endTagOffsetList
- if countBeginTags Γëá countEndTags then
- if countBeginTags > countEndTags then
- repeat with i = 1 to countBeginTags
- set cursor to busy
- if countEndTags is 0 then
- put "ΓÇó" into char (item i of beginTagOffsetList) of storage
- else if i < countBeginTags then
- if item i+1 of beginTagOffsetList < item i of endTagOffsetList and¬
- item i+1 of beginTagOffsetList Γëá empty then
- put "ΓÇó" into char (item i of beginTagOffsetList) of storage
- put "x," before item i of endTagOffsetList
- else if beginTag Γëá "TR" and beginTag Γëá "TD" and beginTag Γëá "FRAMESET" then
- if item i of beginTagOffsetList > item i of endTagOffsetList and¬
- item i of endTagOffsetList Γëá empty then
- put "ΓÇó" into char (item i of endTagOffsetList) of storage
- put "x," before item i of beginTagOffsetList
- end if
- end if
- if item i of beginTagOffsetList Γëá empty and item i of endTagOffsetList = empty then
- if char (item i of beginTagOffsetList) of storage Γëá "ΓÇó" then
- put "ΓÇó" into char (item i of beginTagOffsetList) of storage
- end if
- end if
- end if
- end repeat
- if number of items of beginTagOffsetList > number of items of endTagOffsetList then
- if last item of beginTagOffsetList > last item of endTagOffsetList then
- if char (last item of beginTagOffsetList) of storage Γëá "ΓÇó" then
- put "ΓÇó" into char (last item of beginTagOffsetList) of storage
- end if
- end if
- end if
- else if countBeginTags < countEndTags then
- repeat with i = 1 to countEndTags
- set cursor to busy
- if countBeginTags is 0 then
- put "ΓÇó" into char (item i of endTagOffsetList) of storage
- else if i < countEndTags then
- if item i of beginTagOffsetList > item i of endTagOffsetList then
- put "ΓÇó" into char (item i of endTagOffsetList) of storage
- put "xxxx," before item i of beginTagOffsetList
- end if
- end if
- if item i of beginTagOffsetList = empty and item i of endTagOffsetList Γëá empty then
- if char (item i of endTagOffsetList) of storage Γëá "ΓÇó" then
- put "ΓÇó" into char (item i of endTagOffsetList) of storage
- end if
- end if
- end repeat
- if number of items of beginTagOffsetList < number of items of endTagOffsetList then
- if last item of beginTagOffsetList < last item of endTagOffsetList then
- if char (last item of endTagOffsetList) of storage Γëá "ΓÇó" then
- put "ΓÇó" into char (last item of endTagOffsetList) of storage
- end if
- end if
- end if
- end if
- if countBeginTags Γëá countEndTags then
- put abs(countBeginTags-countEndTags) into dif
- if dif > 1 then
- put "s." into pp
- else put "." into pp
- put return&"Found in '"&thisPage&"' "&dif&" incomplete <"&beginTag&">…<"&endTag&"> pair"&pp after cd fld "Log"
- if thisAction is "mark" then put tab after cd fld "Log"
- set textStyle of word (number of words of last line of cd fld "Log")-1 of last line of cd fld "Log" to bold
- end if
- end if
- end repeat
- set the itemDelimiter to tab
- return storage
- end markTagStructure
-
- function markObsoleteTags storage,thisPage
- if "<LISTING" is in storage then
- put return&"Found in '"&thisPage&"'the obsolete tag(s) <LISTING>." after cd fld "Log"
- repeat until offset("<LISTING",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<LISTING",storage) of storage
- end repeat
- end if
- if "<PLAINTEXT" is in storage then
- put return&"Found in '"&thisPage&"' the obsolete tag(s) <PLAINTEXT>." after cd fld "Log"
- repeat until offset("<PLAINTEXT",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<PLAINTEXT",storage) of storage
- end repeat
- end if
- if "<XMP" is in storage then
- put return&"Found in '"&thisPage&"' the obsolete tag(s) <XMP>." after cd fld "Log"
- repeat until offset("<XMP",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<XMP",storage) of storage
- end repeat
- end if
- if "<BLINK" is in storage then
- put return&"Found in '"&thisPage&"' the browser-dependent tag(s) <BLINK>." after cd fld "Log"
- repeat until offset("<BLINK",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<BLINK",storage) of storage
- end repeat
- end if
- if "<LAYER" is in storage then
- put return&"Found in '"&thisPage&"' the browser-dependent tag(s) <LAYER>." after cd fld "Log"
- repeat until offset("<LAYER",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<LAYER",storage) of storage
- end repeat
- end if
- if "<BGSOUND" is in storage then
- put return&"Found in '"&thisPage&"' the browser-dependent tag(s) <BGSOUND>." after cd fld "Log"
- repeat until offset("<BGSOUND",storage) = 0
- set cursor to busy
- put "ΓÇó" into char offset("<BGSOUND",storage) of storage
- end repeat
- end if
- return storage
- end markObsoleteTags
-
- function convertChars storage,thisPage
- global isConverted
- put false into isConverted
- set the itemDelimiter to comma
- put 0 into errorCount
- put empty into errorOccurList
- put empty into checkList
- repeat with i = 128 to 255
- set cursor to busy
- put 0 into xTimes
- repeat until FullOffset(numToChar(i),storage,false) = 0
- set cursor to busy
- put item i-127 of (ASCII_128to143()&","&ASCII_144to159()&","&ASCII_160to175()&","&¬
- ASCII_176to191()&","&ASCII_192to207()&","&ASCII_208to223()&","&¬
- ASCII_224to239()&","&ASCII_240to255()) into convertItem
- if convertItem is "fake" then exit repeat
- put quote&convertItem"e into logItem
- put convertItem into char FullOffset(numToChar(i),storage,false) of storage
- add 1 to xTimes
- if offset(i,checkList) = 0 then
- put i&space before checkList
- put space&logItem&"," before errorOccurList
- else
- if "x)" is not in word 2 of errorOccurList then
- put " ("&xTimes&"x)" after char (offset(logItem,errorOccurList))+¬
- (length of logItem)-1 of errorOccurList
- else
- if xTimes Γëñ 10 then
- put xTimes into char (offset("x)",errorOccurList))-1 of errorOccurList
- else if xTimes Γëñ 100 then
- put xTimes into char (offset("x)",errorOccurList))-2 to¬
- (offset("x)",errorOccurList))-1 of errorOccurList
- else if xTimes Γëñ 1000 then
- put xTimes into char (offset("x)",errorOccurList))-3 to¬
- (offset("x)",errorOccurList))-1 of errorOccurList
- else if xTimes Γëñ 10000 then
- put xTimes into char (offset("x)",errorOccurList))-4 to¬
- (offset("x)",errorOccurList))-1 of errorOccurList
- end if
- end if
- end if
- add 1 to errorCount
- end repeat
- end repeat
- delete char 1 of errorOccurList
- delete last char of errorOccurList
- if errorCount > 0 then
- if errorCount = 1 then
- put "character" into text1
- put "has" into text2
- else
- if last word of errorOccurList contains "x)" then
- if number of words of errorOccurList > 2 then
- put " and" into last char of word (number of words of errorOccurList)-2 of errorOccurList
- end if
- else
- put " and" into last char of word (number of words of errorOccurList)-1 of errorOccurList
- end if
- put "characters" into text1
- put "have" into text2
- end if
- put true into isConverted
- put return&"Found in '"&thisPage&"' "&errorCount&&text1&&"which"&&text2&&"been"&&¬
- "converted to " after cd fld "Log"
- set textStyle of word (number of words of last line of cd fld "Log")-6 of¬
- last line of cd fld "Log" to bold
- put errorOccurList&"." after cd fld "Log"
- if " and " is not in last line of cd fld "Log" and "x)" is in last word of cd fld "Log" then delete last word of cd fld "Log"
- end if
- set the itemDelimiter to tab
- return storage
- end convertChars
-
- function ASCII_128to143
- return "Ä,Å,Ç,É,Ñ,Ö,Ü,á,à,â,ä,ã,å,ç,é,è"
- end ASCII_128to143
-
- function ASCII_144to159
- return "ê,ë,í,ì,î,ï,ñ,ó,ò,ô,ö,õ,ú,ù,û,ü"
- end ASCII_144to159
-
- function ASCII_160to175
- return "Ý,°,¢,£,§,•,¶,ß,®,©,™,´,¨,fake,Æ,Ø"
- end ASCII_160to175
-
- function ASCII_176to191
- return "fake,±,fake,fake,¥,µ,fake,fake,fake,fake,fake,ª,º,fake,æ,ø"
- end ASCII_176to191
-
- function ASCII_192to207
- return "¿,¡,¬,fake,ƒ,fake,fake,«,»,…, ,À,Ã,Õ,Œ,œ"
- end ASCII_192to207
-
- function ASCII_208to223
- return "&endash;,&emdash;,“,”,‘,’,÷,fake,ÿ,Ÿ,fake,¤,Ð,ð,Þ,þ"
- end ASCII_208to223
-
- function ASCII_224to239
- return "ý,·,‚,„,‰,Â,Ê,Á,Ë,È,Í,Î,Ï,Ì,Ó,Ô"
- end ASCII_224to239
-
- function ASCII_240to255
- return "fake,Ò,Ú,Û,Ù,fake,ˆ,˜,¯,fake,fake,fake,¸,fake,fake,fake"
- end ASCII_240to255
-
- function allBeginTags1
- return "SCRIPT,HTML,HEAD,ABBR,ACRONYM,THEAD,TFOOT,TITLE,BODY,TBODY,OPTGROUP,SPAN,OBJECT,STYLE,COMMENT,PLAINTEXT,OPTION,SELECT,CAPTION,MARQUEE,STRIKE,TT,BLINK,FONT,H1,H2,H3,H4,H5,H6,APPLET,CITE,CODE,DFN,KBD,XMP,PRE,STRONG,SAMP,VAR"
- end allBeginTags1
-
- function allBegintags2
- return "NOOP,BDO,COLGROUP,DEL,DIV,FIELDSET,LEGEND,INS,IFRAME,ADDRESS,BIG,SUB,SMALL,SUP,CENTER,BLOCKQUOTE,MAP,NOBR,OL,UL,DL,DT,DD,LI,DIR,MENU,TABLE,CAPTION,TR,TH,TD,FORM,TEXTAREA,FRAMESET,NOFRAMES,NOSCRIPT,EM,B,I,U,S,A,Q,P"
- end allBeginTags2
-
- function allEndTags1
- return "/SCRIPT,/HTML,/HEAD,/ABBR,/ACRONYM,/THEAD,/TFOOT,/TITLE,/BODY,/TBODY,/OPTGROUP,/SPAN,/OBJECT,/STYLE,/COMMENT,/PLAINTEXT,/OPTION,/SELECT,/CAPTION,/MARQUEE,/STRIKE,/TT,/BLINK,/FONT,/H1,/H2,/H3,/H4,/H5,/H6,/APPLET,/CITE,/CODE,/DFN,/KBD,/XMP,/PRE,/STRONG,/SAMP,/VAR"
- end allEndTags1
-
- function allEndtags2
- return "/NOOP,/BDO,/COLGROUP,/DEL,/DIV,/FIELDSET,/LEGEND,/INS,/IFRAME,/ADDRESS,/BIG,/SUB,/SMALL,/SUP,/CENTER,/BLOCKQUOTE,/MAP,/NOBR,/OL,/UL,/DL,/DT,/DD,/LI,/DIR,/MENU,/TABLE,/CAPTION,/TR,/TH,/TD,/FORM,/TEXTAREA,/FRAMESET,/NOFRAMES,/NOSCRIPT,/EM,/B,/I,/U,/S,/A,/Q,/P"
- end allEndTags2
-
- function allBeginTags1a
- return "SCRIPT,TITLE,OPTGROUP,SPAN,OBJECT,STYLE,COMMENT,PLAINTEXT,SELECT,CAPTION,MARQUEE,STRIKE,TT,BLINK,FONT,H1,H2,H3,H4,H5,H6,APPLET,CITE,CODE,DFN,KBD,XMP,PRE,STRONG,SAMP,VAR"
- end allBeginTags1a
-
- function allBegintags2a
- return "NOOP,ABBR,ACRONYM,BDO,DEL,DIV,FIELDSET,LEGEND,INS,IFRAME,ADDRESS,BIG,SUB,SMALL,SUP,CENTER,BLOCKQUOTE,MAP,NOBR,OL,UL,DL,DIR,MENU,TABLE,CAPTION,FORM,TEXTAREA,FRAMESET,NOFRAMES,NOSCRIPT,EM,B,I,U,S,A,Q"
- end allBeginTags2a
-
- function allEndTags1a
- return "/SCRIPT,/TITLE,/OPTGROUP,/SPAN,/OBJECT,/STYLE,/COMMENT,/PLAINTEXT,/SELECT,/CAPTION,/MARQUEE,/STRIKE,/TT,/BLINK,/FONT,/H1,/H2,/H3,/H4,/H5,/H6,/APPLET,/CITE,/CODE,/DFN,/KBD,/XMP,/PRE,/STRONG,/SAMP,/VAR"
- end allEndTags1a
-
- function allEndtags2a
- return "/NOOP,/ABBR,/ACRONYM,/BDO,/DEL,/DIV,/FIELDSET,/LEGEND,/INS,/IFRAME,/ADDRESS,/BIG,/SUB,/SMALL,/SUP,/CENTER,/BLOCKQUOTE,/MAP,/NOBR,/OL,/UL,/DL,/DIR,/MENU,/TABLE,/CAPTION,/FORM,/TEXTAREA,/FRAMESET,/NOFRAMES,/NOSCRIPT,/EM,/B,/I,/U,/S,/A,/Q"
- end allEndTags2a</script>
- </background>
-